@@ -14,7 +14,6 @@ import android.widget.TextView; |
||
14 | 14 |
import android.widget.Toast; |
15 | 15 |
|
16 | 16 |
import com.android.common.utils.LogHelper; |
17 |
-import com.android.common.utils.NetworkUtil; |
|
18 | 17 |
import com.umeng.analytics.MobclickAgent; |
19 | 18 |
|
20 | 19 |
import java.io.File; |
@@ -37,12 +36,7 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie |
||
37 | 36 |
@BindView(R.id.title_bar_middle_txt) TextView titleTextView; |
38 | 37 |
@BindView(R.id.recycler_view_photos) RecyclerView photosRecyclerView; |
39 | 38 |
@BindView(R.id.iv_scan) ImageView qrcodeScanBtn; |
40 |
- @BindView(R.id.layout_device_status) View deviceConnectLayout; |
|
41 |
- @BindView(R.id.iv_box) ImageView boxIndicator; |
|
42 |
- @BindView(R.id.iv_box_phone_line) ImageView boxPhoneLineIndicator; |
|
43 |
- @BindView(R.id.iv_camera) ImageView cameraIndicator; |
|
44 |
- @BindView(R.id.iv_camera_box_line) ImageView cameraBoxLineIndicator; |
|
45 |
- @BindView(R.id.iv_phone) ImageView phoneIndicator; |
|
39 |
+ |
|
46 | 40 |
private PhotoRecyclerAdapter adapter; |
47 | 41 |
private SessionBean sessionBean; |
48 | 42 |
private SessionContract.Presenter presenter; |
@@ -164,36 +158,6 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie |
||
164 | 158 |
Toast.makeText(this,toast,Toast.LENGTH_SHORT).show(); |
165 | 159 |
} |
166 | 160 |
|
167 |
- @Override |
|
168 |
- public void showBoxDisconnectedView(int errorCode,String errorMsg) { |
|
169 |
- deviceConnectLayout.setVisibility(View.VISIBLE); |
|
170 |
- boxIndicator.setImageResource(R.drawable.box_ok); |
|
171 |
- boxPhoneLineIndicator.setImageResource(R.drawable.link_ok); |
|
172 |
- cameraBoxLineIndicator.setImageResource(R.drawable.link_ok); |
|
173 |
- cameraIndicator.setImageResource(R.drawable.camera_ok); |
|
174 |
- phoneIndicator.setImageResource(R.drawable.network_ok); |
|
175 |
- switch (errorCode){ |
|
176 |
- case 201: |
|
177 |
- case 202: |
|
178 |
- case 203: |
|
179 |
- boxIndicator.setImageResource(R.drawable.box_error); |
|
180 |
- break; |
|
181 |
- case 101: |
|
182 |
- cameraBoxLineIndicator.setImageResource(R.drawable.link_error); |
|
183 |
- break; |
|
184 |
- } |
|
185 |
- if(!NetworkUtil.isWifiConnected(this)){ |
|
186 |
- boxPhoneLineIndicator.setImageResource(R.drawable.link_error); |
|
187 |
- phoneIndicator.setImageResource(R.drawable.network_error); |
|
188 |
- } |
|
189 |
- Toast.makeText(this,NetworkUtil.isWifiConnected(this) ? errorMsg : |
|
190 |
- getString(R.string.network_disconnect),Toast.LENGTH_SHORT).show(); |
|
191 |
- } |
|
192 |
- |
|
193 |
- @Override |
|
194 |
- public void showBoxConnectedView() { |
|
195 |
- deviceConnectLayout.setVisibility(View.GONE); |
|
196 |
- } |
|
197 | 161 |
|
198 | 162 |
@Override |
199 | 163 |
public void refreshUploadTimeHint() { |
@@ -14,8 +14,6 @@ public class SessionContract { |
||
14 | 14 |
void showPhotoRecyclerView(); |
15 | 15 |
void showEmptyView(); |
16 | 16 |
void showToast(String toast); |
17 |
- void showBoxDisconnectedView(int errorCode,String errorMsg); |
|
18 |
- void showBoxConnectedView(); |
|
19 | 17 |
void refreshUploadTimeHint(); |
20 | 18 |
} |
21 | 19 |
|
@@ -76,18 +76,10 @@ |
||
76 | 76 |
android:layout_height="match_parent" |
77 | 77 |
android:layout_below="@id/title_bar_with_back_btn"> |
78 | 78 |
|
79 |
- <include |
|
80 |
- android:id="@+id/layout_device_status" |
|
81 |
- android:layout_height="60dp" |
|
82 |
- android:layout_width="match_parent" |
|
83 |
- layout="@layout/layout_connect_status" |
|
84 |
- android:visibility="gone"/> |
|
85 |
- |
|
86 | 79 |
<android.support.v7.widget.RecyclerView |
87 | 80 |
android:id="@+id/recycler_view_photos" |
88 | 81 |
android:layout_width="match_parent" |
89 |
- android:layout_height="match_parent" |
|
90 |
- android:layout_below="@id/layout_device_status"/> |
|
82 |
+ android:layout_height="match_parent" /> |
|
91 | 83 |
|
92 | 84 |
<ImageButton |
93 | 85 |
android:id="@+id/btn_session_complete" |
@@ -1,48 +0,0 @@ |
||
1 |
-<?xml version="1.0" encoding="utf-8"?> |
|
2 |
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
3 |
- android:layout_width="match_parent" |
|
4 |
- android:layout_height="match_parent" |
|
5 |
- android:gravity="center"> |
|
6 |
- |
|
7 |
- <ImageView |
|
8 |
- android:id="@+id/iv_camera" |
|
9 |
- android:layout_width="32dp" |
|
10 |
- android:layout_height="32dp" |
|
11 |
- android:layout_centerVertical="true" |
|
12 |
- android:src="@drawable/camera_ok" /> |
|
13 |
- |
|
14 |
- <ImageView |
|
15 |
- android:id="@+id/iv_camera_box_line" |
|
16 |
- android:layout_width="100dp" |
|
17 |
- android:layout_height="wrap_content" |
|
18 |
- android:layout_margin="3dp" |
|
19 |
- android:layout_centerVertical="true" |
|
20 |
- android:layout_toRightOf="@+id/iv_camera" |
|
21 |
- android:src="@drawable/link_ok" /> |
|
22 |
- |
|
23 |
- <ImageView |
|
24 |
- android:id="@+id/iv_box" |
|
25 |
- android:layout_width="32dp" |
|
26 |
- android:layout_height="32dp" |
|
27 |
- android:layout_centerVertical="true" |
|
28 |
- android:layout_toRightOf="@+id/iv_camera_box_line" |
|
29 |
- android:src="@drawable/box_ok" /> |
|
30 |
- |
|
31 |
- <ImageView |
|
32 |
- android:id="@+id/iv_box_phone_line" |
|
33 |
- android:layout_width="100dp" |
|
34 |
- android:layout_height="wrap_content" |
|
35 |
- android:layout_margin="3dp" |
|
36 |
- android:layout_centerVertical="true" |
|
37 |
- android:layout_toRightOf="@+id/iv_box" |
|
38 |
- android:src="@drawable/link_ok" /> |
|
39 |
- |
|
40 |
- <ImageView |
|
41 |
- android:id="@+id/iv_phone" |
|
42 |
- android:layout_width="32dp" |
|
43 |
- android:layout_height="32dp" |
|
44 |
- android:layout_centerVertical="true" |
|
45 |
- android:layout_toRightOf="@+id/iv_box_phone_line" |
|
46 |
- android:src="@drawable/network_ok" /> |
|
47 |
- |
|
48 |
-</RelativeLayout> |